import { callAPI } from './config';

// 用户登录
export const login = (username, password) => {
  return callAPI('auth/login', 'POST', { username, password });
};

// 用户注册
export const register = (username, password, role) => {
  return callAPI('auth/register', 'POST', { username, password, role });
};

// 获取用户信息
export const getUserInfo = () => {
  return callAPI('auth/user');
};

// 获取商家列表（针对客户）
export const getMerchants = () => {
  return callAPI('auth/merchants');
};